registerTag Method |
This method registers any HTML tag or attribute that is not considered by translator for translation.
Syntax
object.registerTag(sTagName, sAttributeName [, bIsXhtml]);
Parameters
Parameter |
Description |
---|---|
oTagName |
Optional. String that specifies the name of the tag that needs to be registered with the translator component. |
sAttributeName |
Required. String that specifies the name of the attribute added. |
bIsXhtml |
Optional. Boolean that denotes whether the translatable value for the tag at run time should be taken as text or XHTML.
|
Return Value
No return value.
Remarks
By default translator comes with support to minimum HTML tags with their attributes or properties which can be translated. The new tags are registered using this method. After registering, the translator considers the element for translation at run time. If the parameter 'tagName' is not specified, then the 'attributeName' specified will be taken as a common one for all the translatable elements.
Example
The following example shows how the registerHTML method is used to register an option of the context menu to the translator component.
//translator is the id of the translator component translator.registerTag(myTag, myAttribute, false);